GdkSurface *pointer_window;
GtkWidget *widget = NULL;
- pointer_window = gdk_device_get_surface_at_position (gtk_get_current_event_device (), NULL, NULL);
+ pointer_window = gdk_device_get_surface_at_position_double (gtk_get_current_event_device (), NULL, NULL);
if (pointer_window)
widget = GTK_WIDGET (gtk_root_get_for_surface (pointer_window));
gtk_tooltip_trigger_tooltip_query (GtkWidget *widget)
{
GdkDisplay *display;
- gint x, y;
+ double x, y;
GdkSurface *surface;
GdkDevice *device;
GtkWidget *toplevel;
/* Trigger logic as if the mouse moved */
device = gdk_seat_get_pointer (gdk_display_get_default_seat (display));
- surface = gdk_device_get_surface_at_position (device, &x, &y);
+ surface = gdk_device_get_surface_at_position_double (device, &x, &y);
if (!surface)
return;
if (gtk_widget_get_surface (toplevel) != surface)
return;
- gtk_widget_translate_coordinates (toplevel, widget, x, y, &dx, &dy);
+ gtk_widget_translate_coordinates (toplevel, widget, round (x), round (y), &dx, &dy);
gtk_tooltip_handle_event_internal (GDK_MOTION_NOTIFY, surface, widget, dx, dy);
}
GtkWidget *widget = NULL;
GdkSurface *pointer_surface;
- pointer_surface = gdk_device_get_surface_at_position (device, NULL, NULL);
+ pointer_surface = gdk_device_get_surface_at_position_double (device, NULL, NULL);
if (pointer_surface)
widget = gtk_root_get_for_surface (pointer_surface);